1. Technical Field
The disclosure relates to a data transmission method. Particularly, the disclosure relates to a data transmission device and a method for merging multiple commands.
2. Related Art
FIG. 1 is a schematic diagram illustrating a host 100 and a peripheral device 110. As shown in FIG. 1, the host 100 (for example, a computer device) and the peripheral device 110 are generally connected through a data transmission interface. In order to use a function of the peripheral device 110 (for example, to access digital information stored in the peripheral device 110), an operating system of the host 100 sends an command to the peripheral device 110 through collaboration of related driving programs and hardware, so as to use the related function of the peripheral device 110.
When the host 100 sends a plurality of commands to the peripheral device 110 within a short time, these commands form a queue to wait for the peripheral device 110 to process. The peripheral device 110 generally determines a processing sequence of these commands according to a transmission sequence thereof or determines the processing sequence by itself, so as to sequentially perform data access. However, when the commands sent by the host 100 are excessive to result in a long queue, the peripheral device 110 still executes the commands one-by-one according to the number of the commands. Therefore, the conventional method cannot effectively speed up the processing time of the commands.